<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="Keywords" content=""/>
    <meta name="Description" content=""/>
    <title>已买到的宝贝</title>
    <link rel="stylesheet" type="text/css" href="__CSS__/home/68ecshop_common.css"/>
    <link rel="stylesheet" type="text/css" href="__CSS__/home/user.css"/>
    <script src="__JQ__" type="text/javascript" charset="utf-8"></script>
    <script src="__JS__/home/common.min.js" type="text/javascript" charset="utf-8"></script>
    <!--			layer-->
    <script type="text/javascript" src="__JS__/jquery.form.js"></script>
    <script type="text/javascript" src="__JS__/tips/toastr.min.js"></script>
    <script type="text/javascript" src="__JS__/layer/layer.js"></script>
    <script type="text/javascript" src="__JS__/jquery.layer.js"></script>
    <!--			layer-->
</head>
<body>
<include file="Public/head_a" />
<include file="Public/head_b" />
<include file="Public/head_c" />
<div class="margin-w1210 clearfix">
    <!--S用户中心公共左边-->
    <include file="Public/user_left"/>
    <!--E用户中心公共左边-->
    <div class="user-right">

        <div class="box" style="margin-left: 10px; width: 989px;">
            <div class="tabmenu">
                <ul class="tab">
                    <li class="active" style="width: 950px;text-align: left;"><a href="#">我的订单</a></li>
                </ul>
            </div>
            <div id="J_Remide" class="remide-box">
                <h3>我的交易提醒：</h3>
                <ul>
                    <li><a href="{:U('Order/index')}">全部订单<span class="num">({$all})</span></a></li>
                    <li><a href="{:U('Order/waitPay')}" style="color: #FF2626;">未付款<span class="num">({$waitPay})</span></a></li>
                    <li><a href="{:U('Order/waitSend')}">待发货<span class="num">({$waitSend})</span></a></li>
                    <li><a href="{:U('Order/waitConfirm')}">已发货<span class="num">({$waitConfirm})</span></a></li>
                    <li><a href="{:U('Order/waitRate')}">已完成<span class="num">({$waitRate})</span></a></li>
                </ul>
            </div>
            <div class="extra-r" style="display:none">
                <div class="search-01">
                    <input id="ip_keyword" name="" class="s-itxt" value="商品名称、商品编号、订单编号"
                           onfocus="if (this.value==this.defaultValue) this.value=''"
                           onblur="if (this.value=='') this.value=this.defaultValue"
                           onkeydown="javascript:if(event.keyCode==13) OrderSearch('ip_keyword');" type="text">

                    <a href="javascript:;" class="btn-13" onclick="OrderSearch('ip_keyword')"
                       clstag="click|keycount|orderinfo|search">查 询</a></div>
                <div class="blank"></div>
            </div>

            <form name="myform" id="myform" action="" method="post">
<!--            	<div class="box_hebing">
            		<input type="checkbox" class="f_checkbox" name="" id="" value="" />
            		<input type="submit" name="" id="" value="合并付款" />
            	</div>-->
            <foreach item="m" name="arrOrder">
             <div style="height: 15px; width: 100%;"></div>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="bought-table">
                <thead>
                <tr class="col-name">
                    <th width="32%" style="border-left: 1px solid #E6E6E6;position: relative;"><input class="f_checkbox f_pub_checkbox " name="" id="" value="" type="checkbox">宝贝</th>
                    <th width="10%">属性</th>
                    <th width="9%">单价(元)</th>
                    <th width="5%">数量</th>
                    <th width="8%">订单总金额</th>
                    <th width="10%">状态</th>
                    <th width="13%" style="border-right: 1px solid #E6E6E6;">操作</th>
                </tr>
                </thead>
                <tbody class="close-order">
                    <foreach name="m.OrderGoods" item="v1" key="k">
                    <if condition="$k eq 0">
                    <tr class="order-hd">
                        <td colspan="6" rowspan="1">
                                <span class="no">
                                    <label> 订单编号：
                                        <span class="order-num">
                                            <a href="{:U('Order/details',array('order_id'=>$v['order_id']))}" class="main-color">{$v['order_sn']}</a>
                                        </span>
                                    </label>
                                </span>
                            <span class="deal-time">&nbsp;&nbsp;成交时间：{$m['add_time']|date="y-m-d G:i:s",###}</span>
                            <span class="deal-time">&nbsp;&nbsp;商家店铺:{$m['store_name']}</span>
                        </td>
                        <?php
                                $OG = count($m['OrderGoods']);
                        ?>
                            <td align="center" class="other" rowspan="<?php echo count($m['OrderGoods']) + $OG;?>" colspan="1">
                                    <a href="{:HOME_URL}/Wxpay/paymentConfirm?key={$m['pay_sn']|auth_encode}" target="_blank" class="on_money">立即付款</a><br>
                                    <a class="on_comment js-del" data="{$m['order_id']}" url="{:('/Order/cancel')}" href="javascript:;" title="取消订单"><i class="icon-minus-circle"></i>取消订单</a><br>
                                    <a class="on_comment js-del" data="{$m['order_id']}" url="{:('/Order/del')}" href="javascript:;" title="删除订单"><i class="icon-minus-circle"></i>删除订单</a><br>
                                    <a href="{:U('Order/details',array('key'=>$m['order_sn']))}" class="main-color">查看详情</a>
                            </td>
                    </tr>
                    </if>
                    
                    <tr class="order-bd last">
                        <td align="center" class="baobei no-border-right order_goods_info">
                            <div class="goods_desc last" style="height: 60px;">
                                <a class="pic" href="{:HOME_URL}/Goods/{$v1['goods_id']}" title="{$v1['goods_title']}" target="_blank"><img src="{$v1['goods_image']}" alt="查看宝贝详情" width="50" height="50"></a>
                                <div class="goods_name"><a href="{:HOME_URL}/Goods/{$v1['goods_id']}" title="{$v1['goods_title']}" target="_blank">{$v1['goods_title']}</a></div>
                            </div>
                        </td>
                        <td align="center" class="baobei no-border-right order_goods_attr">
                                <div class="goods_desc goods_desc_t last">{$v1['goods_attri_info']} <br></div>
                        </td>
                        <td align="center" class="baobei no-border-right order_goods_info" style="padding:0px;">
                                <div class="goods_desc price  last" style="padding-left: 0px; line-height: 50px; height: 60px;">￥{$v1['goods_price']}</div>
                        </td>
                        <td align="center" class="baobei no-border-right order_goods_info" style="padding:0px;">
                                <div class="goods_desc  last" style="padding-left: 0px; line-height: 50px; height: 60px;">{$v1['goods_num']}</div>
                        </td>
                        <td rowspan="1" align="center" class="amount no-border-right"><p class="post-type"><strong>￥{$m['goods_amount']}</strong></p></td>
                        <td rowspan="1" align="center" class="trade-status no-border-right">未付款<br>未发货<br></td>
                    </tr>
                    </foreach>
                    </tbody>
            </table>
            </foreach>
            </form>
            <div class="page">{$page}</div>
            <script type="text/javascript">
                $(function () {
                    $('.order_goods_info').find('.goods_desc').each(function () {
                        $(this).css('height', $(this).parents('.order_goods_info').siblings('.order_goods_attr').find('.goods_desc').eq($(this).index()).height());
                    });
                })
            </script>
        </div>
    </div>
</div>
<div class="pop-mask"></div>
<div class="site-footer">
    <div class="footer-related">
        <include file="Public/bootom_a" />
        <include file="Public/bootom_b" />
        <include file="Public/bootom_c" />
    </div>
</div>
<a href="#" class="big-link" data-reveal-id="myModal" data-animation="fade"></a>
</body>

</html>
<!--layer-->
<script type="text/javascript">
    $('#myform').layer({
        actionUrl: "batchAction",
        deleteUrl: "{:U('/Order/del')}",
    });
    $(".f_checkbox").eq(0).click(function(){
    	var p=$(this).attr("checked");
    	if(!!p){
    		$(".f_checkbox").attr("checked",true)
    	}else{
    		$(".f_checkbox").attr("checked",false)
    	}
    })
    $(".f_pub_checkbox").click(function(){
    	var num=0;
    	$(".f_pub_checkbox").each(function(){
    		if(!!$(this).attr("checked")){
    			num++;
    		}
    	})
    	if(num==$(".f_pub_checkbox").length){
    		$(".f_checkbox").eq(0).attr("checked",true)
    	}else{
    		$(".f_checkbox").eq(0).attr("checked",false)
    	}
    })
</script>
